/**
 * 
 */
package fr.univ_tln.inf9.exaplanning.controleur.salle;

import fr.univ_tln.inf9.exaplanning.api.salle.Material;
/**
 * @author pivi
 * 
 *
 */
public class MaterialController {
	
	/**
	 * Ici les déclarations des frames de la gui
	 */
	/*public UserView fieldView = null;*/
	public MaterialView listView = null;
	
	private Material mat = null;
	
	public MaterialController (Material mat){
		this.mat = mat;
		
		/*fieldView = new JFrameFieldNom(this, user.getNom());
		listView = new JFrameListNom(this, user.getNom());*/
		
		addListenersToType();
		
		}

	private void addListenersToType() {
		mat.addTypeListener(listView);
		
	}

	
	public void displayViews(){
		listView.display();
	}
	
	public void closeViews(){
		listView.close();
	}
	
	public void notifyMaterialChanged(String materiel){
		mat.setType(materiel);
	}
	

}
